<?php /*a:3:{s:70:"D:\phpStudy\WWW\Zeroadmin\front\app\admin\view\admin\dynamic\edit.html";i:1636449636;s:62:"D:\phpStudy\WWW\Zeroadmin\front\app\admin\view\common\css.html";i:1635408459;s:61:"D:\phpStudy\WWW\Zeroadmin\front\app\admin\view\common\js.html";i:1635408097;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title> Zero Admin </title>
<!-- 依 赖 样 式 -->
<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
<!-- 加 载 样 式-->
<link rel="stylesheet" href="/static/admin/css/loader.css" />
<!-- 布 局 样 式 -->
<link rel="stylesheet" href="/static/admin/css/admin.css" />

<!--首页-->
<link rel="stylesheet" href="/static/admin/css/other/console1.css" />
</head>
<style>
    
</style>
<body class="pear-container">
<form class="layui-form" action="">
    <div class="layui-card">
        <!-- <div class="layui-card-header">
            <a href="<?php echo htmlentities(app('request')->root()); ?>/admin.dynamic/index"><i class="layui-icon layui-icon-return"></i>&nbsp;返回</a>
        </div> -->
        <div class="layui-card-body">
            <br>
            <div class="layui-form-item layui-col-md10">
                <label class="layui-form-label">发布标题</label>
                <div class="layui-input-block">
                    <input type="text" name="title" lay-verify="required" placeholder="请输入发布标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            
            <div class="layui-form-item layui-form-text layui-col-md10">
                <label class="layui-form-label">发布内容</label>
                <div class="layui-input-block">
                <textarea name="content" placeholder="请输入发布内容" class="layui-textarea" lay-verify="required" autocomplete="off"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-col-md10">
                <label class="layui-form-label">日期选择</label>
                <div class="layui-input-block">
                    <input type="text" name="create_time" id="create_time" placeholder="请输入选择时间"  lay-verify="required" autocomplete="off"  class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit lay-filter="save">
                        <i class="layui-icon layui-icon-ok"></i>
                        提 交
                    </button>
                    <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                        <i class="layui-icon layui-icon-refresh"></i>
                        重 置
                    </button>
                </div>
            </div>
        </div>
    </div>
</form>
<!-- 依 赖 脚 本 -->
<script src="/static/component/layui/layui.js"></script>
<script src="/static/component/pear/pear.js"></script>
<script>
layui.use(['form','jquery','laydate','toast'],function(){
    let form = layui.form;
    let laydate = layui.laydate;
    let $ = layui.jquery;
    let toast = layui.toast;
    //时间选择器
    laydate.render({
        elem: '#create_time'
        ,type: 'datetime'
    });
    form.on('submit(save)', function(data){
        $.ajax({
            data:JSON.stringify(data.field),
            dataType:'json',
            contentType:'application/json',
            type:'post',
            success:function(res){
               //判断有没有权限
                if(res.code==200){
                    // toast.success({title: '成功提示',message:res.msg,position: 'topRight'});
                    layer.msg(res.msg,{icon:1,time:1000},function(){
                        parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
                        parent.location.reload();
                    });
                }else{
                    layer.msg(res.msg,{icon:2,time:1000});
                    // toast.error({title: '失败提示',message: res.msg,position: 'topRight'});
                }
            }
        })
        return false;
    });
})
</script>
</body>
</html>